package com.example.md.mddemo.tabledemo.tableroute;

/**
 * Copyright © 2018年 ziniuxiaozhu. All rights reserved.
 *
 * @Author 临江仙 hzqiuxm@163.com
 * TODO:亲爱的临江仙，请写点注释吧...........
 * @Date 2018/9/5 15:49
 */
public class DbContextHolder{

    private static final ThreadLocal<String> tableIndexHolder= new ThreadLocal<String>();


    public static void setTableIndex(String tableIndex){
        tableIndexHolder.set(tableIndex);
    }

    public static String getTableIndex(){
        return (String) tableIndexHolder.get();
    }


    public static void clearTableIndex(){
        tableIndexHolder.remove();
    }

}
